package com.dd.cloud.user.mapper.educationvisit;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dd.cloud.user.entity.educationvisit.PatientEducationVisit;
import com.dd.cloud.user.req.education.*;
import com.dd.cloud.user.res.education.*;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 患教文章管理 Mapper 接口
 * </p>
 *
 * @author czg
 * @since 2024-01-15
 */
public interface PatientEducationVisitMapper extends BaseMapper<PatientEducationVisit> {

    /**
     * 分页查询患教文章
     *
     * @param page
     * @param req
     * @return
     */
    Page<PatientEducationVisit> queryPatientEducationArticlePage(@Param("page") Page<PatientEducationVisit> page,
                                                                 @Param("req") PatientEducationArticleReq req);

    /**
     * 订单详情 查询患教文章/问卷(分页)
     *
     * @param iPage
     * @param req
     * @return
     */
    IPage<PatientEducationOrderRes> queryPatientEducationOrder(IPage<?> iPage, @Param("req") PatientEducationOrderReq req);

    /**
     * 分页查询患教文章记录
     *
     * @param req
     * @return
     * @Param page
     */
    Page<PatientEducationRecordRes> queryPatientEducationPushRecordPage(@Param("page") Page<PatientEducationRecordRes> page,
                                                                        @Param("req") PatientEducationPushRecordReq req);

    /**
     * 分页查询用药记录
     *
     * @param req
     * @param page
     */
    Page<PatientEducationUseDrugRes> queryUserDrugRecordPage(@Param("page") Page<PatientEducationUseDrugRes> page,
                                                             @Param("req") PatientEducationVisitReq req);

    /**
     * 查询随访/患教列表
     *
     * @param page
     * @param req
     */
    Page<PatientEducationRecordRes> queryCloudConsultingRoomPage(@Param("page") Page<PatientEducationRecordRes> page,
                                                                 @Param("req") PatientEducationPushRecordReq req);

    /**
     * 订单模块 查询患教文章/随访/电话随访/用药提醒记录
     *
     * @param iPage
     * @param req
     * @return
     */
    IPage<PatientEducationRecordOrderRes> queryPatientEducationRecordOrder(IPage<?> iPage, @Param("req") PatientEducationRecordOrderReq req);

    /**
     * 查询需要用药提醒的处方
     *
     * @param iPage
     * @return
     */
    IPage<PatientPresDrugTipRes> queryPatientPresDrugTip(IPage<?> iPage);
}
